package com.cuhk.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cuhk.common.utils.PageUtils;
import com.cuhk.gulimall.product.entity.CategoryEntity;
import com.cuhk.gulimall.product.vo.CategoryLevel2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author chenyuijing
 * @email torchsam@aliyun.com
 * @date 2024-06-10 11:23:16
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    void removeMenusByIds(Long[] catIds);

    Long[] findCateLogPath(Long cateLogId);

    void updateCascade(CategoryEntity categoryEntity);

    List<CategoryEntity> getLevel1Categories();

    // 查询指定一级分类下
    // 所有的二级分类
    List<CategoryEntity> getLevel2Categories(Long firstLevelCateLogId);

    Map<String, List<CategoryLevel2Vo>> getCatalogJsonFromDB();

    Map<String, List<CategoryLevel2Vo>> getCatalogJsonFromRedis();

    Map<String, List<CategoryLevel2Vo>> getCatalogJson();

}

